<!DOCTYPE html>
<html>

<head th:insert="common :: head">
</head>
<head>
    <title>文章发布</title>
    <link rel="stylesheet" href="/css/jquery.tagsinput.min.css">
    <link rel="stylesheet" href="/editor.md-v1.5/css/editormd.css">
</head>
<body>
<!-- navbar-->

<div class="d-flex align-items-stretch">
    <div id="sidebar" class="sidebar py-3 shrink show" th:include="common :: sidebar">
    </div>

    <div class="page-holder w-100 d-flex flex-wrap">
        <div class="container-fluid px-xl-3 py-3">
            <div class="container"></div>
            <div class="row ">
                <div class="col-lg-8 mb-3">
                    <input name="title" class="form-control "
                           type="text" placeholder="请输入文章题目">
                </div>
                <div class="mb-3 selected col-lg-1">
                    <select name="type" class="form-control " autocomplete="off">
                        <option value="1">生活</option>
                        <option value="2">技术</option>
                        <option value="3">杂记</option>
                    </select>
                </div>
                <div class="mb-3 col-lg-3">
                    <button class="btn btn-primary" type="button" id="save" onclick="saveArticle()">保存(crtl+s)</button>
                    <button type="button " class="btn btn-green" onclick="publishArticle()">发布</button>
                    <button type="button " class="btn btn-green " onclick="setting()">设置</button>
                    <div aria-labelledby="userInfo" id="setting" style="display: none">
                        <div class="dropdown-divider"></div>
                        <div class="dropdown-item">
                            <div class="row">
                                <div class="col-xl-8">
                                    <span>是否置顶</span>
                                </div>
                                <div class="col-xl-4">
                                    <label class="lyear-switch switch-solid switch-yellow">
                                        <input name="ontop" type="checkbox" value="1">
                                        <span></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="dropdown-item">
                            <div class="row">
                                <div class="col-xl-8">
                                    <span style="">开启评论</span>
                                </div>
                                <div class="col-xl-4">
                                    <label class="lyear-switch switch-solid switch-yellow">
                                        <input name="commentable" type="checkbox" value="0" checked>
                                        <span></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="dropdown-divider"></div>
                        <div class="dropdown-item">
                            访问密码：
                            <input name="articlePwd" class="form-control" placeholder="访问密码">
                        </div>
                        <div class="dropdown-item">
                            访问路径：
                            <input name="articleUrl" class="form-control" placeholder="访问路径">
                        </div>
                        <div class="dropdown-divider"></div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-lg-8 mb-3">
                    <input name="abstractText" class="form-control "
                           type="text" placeholder="用一句话描述文章摘要">
                </div>
                <div class="input-group mb-3 col-xl-4">
                    <input class="form-control js-tags-input" type="text" id="tags" name="tags"
                           placeholder="请输入标签"
                           value="MLog">
                </div>
                <div id="links"></div>
            </div>
            <div class="form-group" id="editor">
                  <textarea class="col-xl-12" style="display:none;">
                 </textarea>
            </div>
            <form></form>
        </div>
    </div>
</div>
<div th:include="common :: footer"></div>
<script src="/js/jquery.tagsinput.min.js"></script>
<script src="/js/publish.js"></script>
<script src="/layuiSimpleBlog/res/layui/layui.all.js"></script>
<script src="/js/uploadImage.js"></script>
<script src="/editor.md-v1.5/editormd.js"></script>
</body>
</html>